package com.github.pig.admin.model.device;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;

/**
 *
 * @author sxf
 * @since 2018-06-25
 */
@TableName("guard_device")
public class GuardDevice extends Model<GuardDevice> {

    private static final long serialVersionUID = 1L;

    //梯控
    public static String TYPE_ELE = "1";
    //门禁
    public static String TYPE_GUARD = "0";


    @TableId(value="id", type= IdType.AUTO)
    private Integer id;
    /**
     * 小区门
     */
    @TableField("community_id")
    private String communityId;
    /**
     * 小区门
     */
    @TableField("guard_id")
    private String guardId;
    @TableField("guard_pid")
    private String guardPid;
    /**
     * 设备号
     */
    @TableField("device_id")
    private String deviceId;
    /**
     * 设备名称
     */
    @TableField("device_name")
    private String deviceName;
    /**
     * 设备类型
     */
    @TableField("device_type")
    private String deviceType;
    /**
     * 设备编号
     */
    private Integer sort;
    /**
     * 类型(门禁：0；梯控：1)
     */
    private String type;
    /**
     * 楼层
     */
    private Integer floor;
    /**
     * 当前用户数
     */
    @TableField("user_now")
    private Integer userNow;
    /**
     * 用户上限
     */
    @TableField("user_max")
    private Integer userMax;
    /**
     * 创建人
     */
    @TableField("create_user")
    private String createUser;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新人
     */
    @TableField("update_user")
    private String updateUser;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 是否删除  -1：已删除  0：正常
     */
    @TableField("del_flag")
    private String delFlag;
    private String var1;
    private String var2;

    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getCommunityId() {
        return communityId;
    }

    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }

    public String getGuardId() {
        return guardId;
    }

    public void setGuardId(String guardId) {
        this.guardId = guardId;
    }

    public String getGuardPid() {
        return guardPid;
    }

    public void setGuardPid(String guardPid) {
        this.guardPid = guardPid;
    }

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getFloor() {
        return floor;
    }

    public void setFloor(Integer floor) {
        this.floor = floor;
    }

    public Integer getUserNow() {
        return userNow;
    }

    public void setUserNow(Integer userNow) {
        this.userNow = userNow;
    }

    public Integer getUserMax() {
        return userMax;
    }

    public void setUserMax(Integer userMax) {
        this.userMax = userMax;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getVar1() {
        return var1;
    }

    public void setVar1(String var1) {
        this.var1 = var1;
    }

    public String getVar2() {
        return var2;
    }

    public void setVar2(String var2) {
        this.var2 = var2;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "GuardDevice{" +
                ", id=" + id +
                ", communityId=" + communityId +
                ", deviceId=" + deviceId +
                ", deviceName=" + deviceName +
                ", deviceType=" + deviceType +
                ", sort=" + sort +
                ", type=" + type +
                ", floor=" + floor +
                ", userNow=" + userNow +
                ", userMax=" + userMax +
                ", createUser=" + createUser +
                ", createTime=" + createTime +
                ", updateUser=" + updateUser +
                ", updateTime=" + updateTime +
                ", delFlag=" + delFlag +
                ", var1=" + var1 +
                ", var2=" + var2 +
                "}";
    }
}
